home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / Standard File Samples / CustomPutAppend / CustomPutAppend.r < prev    next >
Encoding:
Text File  |  1995-06-16  |  3.5 KB  |  122 lines  |  [TEXT/MMCC]

  1. #define SystemSevenOrLater 1
  2. #include "types.r"
  3. #include "BalloonTypes.r"
  4.  
  5.  
  6. /*\
  7. |*| ---------------------------------------------------------------------
  8. |*| StandardPutFile 'DITL' with added Append button
  9. |*| ---------------------------------------------------------------------
  10. \*/
  11. resource 'DITL' (129, purgeable)
  12. {
  13.     {
  14.     /* the standard PutFile dialog */
  15.         /*  1 */ {189, 252, 209, 332}, Button     { enabled, "Save" },
  16.         /*  2 */ {130, 252, 150, 332}, Button     { enabled, "Cancel" },
  17.         /*  3 */ {  0,   0,   0,   0}, HelpItem   { disabled, HMScanhdlg { -6043 } },
  18.         /*  4 */ {  8, 235,  24, 337}, UserItem   { enabled },
  19.         /*  5 */ { 32, 252,  52, 332}, Button     { enabled, "Eject" },
  20.         /*  6 */ { 60, 252,  80, 332}, Button     { enabled, "Desktop" },
  21.         /*  7 */ { 29,  12, 157, 230}, UserItem   { enabled },
  22.         /*  8 */ {  6,  12,  25, 230}, UserItem   { enabled },
  23.         /*  9 */ {119, 250, 120, 334}, Picture    { disabled, 11 },
  24.         /* 10 */ {187,  15, 203, 227}, EditText   { enabled, "" },
  25.         /* 11 */ {166,  15, 182, 227}, StaticText { disabled, "Save as:" },
  26.         /* 12 */ { 88, 252, 108, 332}, UserItem   { disabled },
  27.         
  28.     /* my additions */
  29.         /* 13 */ {158, 252, 178, 332}, Button     { enabled, "Append" },
  30.         /* 14 */ {  0,   0,   0,   0}, HelpItem   { disabled, HMScanhdlg { 129 } }
  31.     }
  32. };
  33.  
  34.  
  35. /*\
  36. |*| ---------------------------------------------------------------------
  37. |*| StandardPutFile 'DLOG' with extra room Append button
  38. |*| ---------------------------------------------------------------------
  39. \*/
  40. resource 'DLOG' (129, purgeable)
  41.     {
  42.         {0, 0, 218, 344},
  43.         dBoxProc, invisible, noGoAway,
  44.         0, 129, ""
  45.     };
  46.  
  47.  
  48. /*\
  49. |*| ---------------------------------------------------------------------
  50. |*| 'hdlg' for Balloon Help for Append button
  51. |*| ---------------------------------------------------------------------
  52. \*/
  53. resource 'hdlg' (129, purgeable)
  54. {
  55.     2, 12, 0, 0, 0,
  56.     HMSkipItem { },
  57.     {    /* array HDialogArray: 1 elements */
  58.         /* [ 1] */ HMStringResItem { {0, 0}, {0, 0, 0, 0}, 129, 1, 129, 2, 129, 0, 129, 0 },
  59.     }
  60. };
  61.  
  62.  
  63. /*\
  64. |*| ---------------------------------------------------------------------
  65. |*| Balloon Help strings for Append button
  66. |*| ---------------------------------------------------------------------
  67. \*/
  68. resource 'STR#' (129, purgeable)
  69. {
  70.     {    
  71.         /* [1] */
  72.         "To append your document to the file in t"
  73.         "he folder or disk whose contents are lis"
  74.         "ted in the window, click this button.  T"
  75.         "he document will be appended to the file"
  76.         " with the name shown in the box below th"
  77.         "e window.",
  78.         /* [2] */
  79.         "To append your document to the file in t"
  80.         "he folder or disk whose contents are lis"
  81.         "ted in the window, click here.  The butt"
  82.         "on is not available because no file with"
  83.         " this name exists, or because you cannot"
  84.         " make changes to the selected folder or "
  85.         "disk.",
  86.     }
  87. };
  88.  
  89.  
  90. /*\
  91. |*| ---------------------------------------------------------------------
  92. |*| 'DITL' for the alert to output the results
  93. |*| ---------------------------------------------------------------------
  94. \*/
  95. resource 'DITL' (128)
  96. {
  97.     {    
  98.         {74, 270, 94, 350}, Button { enabled, "Quit" },
  99.         {74, 175, 94, 255}, Button { enabled, "Again…" },
  100.         {11,  77, 64, 329}, StaticText { disabled, "Good: ^0\nReplace: ^1\nName: ^2" }
  101.     }
  102. };
  103.  
  104.  
  105. /*\
  106. |*| ---------------------------------------------------------------------
  107. |*| 'ALRT' for the alert to output the results
  108. |*| ---------------------------------------------------------------------
  109. \*/
  110. resource 'ALRT' (128)
  111. {
  112.     {180, 100, 286, 468},
  113.     128,
  114.     {    
  115.         OK, visible, silent,
  116.         OK, visible, silent,
  117.         OK, visible, silent,
  118.         OK, visible, silent
  119.     }
  120. };
  121.  
  122.